<<<<<<< HEAD
import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
    {
        path: '/',
        name: 'Home',
        redirect: '/home',
        hidden: true
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import('@/views/account/Login.vue'),
        hidden: true
    },
    {
        path: '/home',
        name: 'Admin',
        meta: {
            title: '控制台',
            icon: 'home'
        },
        component: () => import('@/layout/index.vue'),
        redirect: '/console',
        children: [
            {
                path: '/console',
                name: 'console',
                meta: {
                    title: '首页',
                },
                component: () => import('@/views/console/index.vue')
            }
        ]
    },
    {
        path: '/job',
        name: 'Job',
        meta: {
            title: '热门岗位',
            icon: 'user'  // 这个图标可以后续更换
        },
        component: () => import('@/layout/index.vue'),
        children: [
            {
                path: '/job-index',
                name: 'JobIndex',
                meta: {
                    title: '岗位列表'
                },
                component: () => import('@/views/job/index.vue')  // 新建岗位列表页面
            },
            {
                path: '/favorites',
                name: 'Favorites',
                meta: {
                    title: '收藏列表'
                },
                component: () => import('@/views/job/Favorites.vue')
            }
        ]
    },
    {
        path: '/info',
        name: 'Info',
        meta: {
            title: '信息管理',
            icon: 'info'
        },
        component: () => import('@/layout/index.vue'),
        children: [
            {
                path: '/info-index',
                name: 'InfoIndex',
                meta: {
                    title: '信息列表'
                },
                component: () => import('@/views/info/index.vue')
            },
            {
                path: '/info-detail',
                name: 'InfoDetail',
                meta: {
                    title: '信息详情'
                },
                component: () => import('@/views/info/Detail.vue'),
                hidden: true
            }
        ]
    },
    {
        path: '/404',
        component: () => import('@/views/404.vue'),
        hidden: true
    },
    {
        path: '/:pathMatch(.*)*',
        redirect: '/home',
        hidden: true
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
=======
import { createRouter, createWebHistory } from 'vue-router'
import BackendIndex from '../view/backend/Index.vue'
import InterviewLayout from '@/layout/feature/InterviewLayout.vue'
import ResumeLayout from '@/layout/resume/ResumeLayout.vue'

const routes = [
  // 登录页
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/view/account/Login.vue'),
    hidden: true
  },
  // 首页 - 新主页
  {
    path: '/',
    name: 'Home',
    component: () => import('@/view/console/index.vue'),
    hidden: true
  },
  // 企业展示路由
  {
    path: '/enterprises',
    name: 'EnterpriseList',
    component: () => import('@/view/enterprise/EnterpriseList.vue'),
    hidden: true
  },
  {
    path: '/enterprises/create',
    name: 'EnterpriseCreate',
    component: () => import('@/view/enterprise/EnterpriseCreate.vue'),
    hidden: true
  },
  {
    path: '/enterprises/:id',
    name: 'EnterpriseDetail',
    component: () => import('@/view/enterprise/EnterpriseDetail.vue'),
    hidden: true
  },
  // 岗位展示页面（面向求职者）
  {
    path: '/jobs',
    name: 'JobListPage',
    component: () => import('@/view/job/JobListPage.vue'),
    hidden: true
  },
  // 个人中心（独立页面）
  {
    path: '/personal-center',
    name: 'PersonalCenter',
    component: () => import('@/view/master/PersonalCenter.vue'),
    hidden: true
  },
  // 简历模块路由
  {
    path: '/resume',
    name: 'Resume',
    component: ResumeLayout,
    children: [
      { path: 'dashboard', name: 'resumeDashboard', component: () => import('@/view/master/Dashboard.vue') },
      { path: 'editor', name: 'resumeEditor', component: () => import('@/view/master/ResumeEditor.vue') },
      { path: 'my-resumes', name: 'myResumes', component: () => import('@/view/master/MyResumes.vue') },
      { path: 'share', name: 'resumeShare', component: () => import('@/view/master/ResumeShare.vue') },
      { path: 'favorites', name: 'resumeFavorites', component: () => import('@/view/master/ResumeFavorites.vue') },
      { path: 'template/create', name: 'templateCreator', component: () => import('@/view/master/TemplateCreator.vue') },
      { path: ':id', name: 'resumeView', component: () => import('@/view/master/ResumeView.vue') }
    ]
  },
  // 企业模块路由 - 前台
  {
    path: '/frontend',
    name: 'Frontend',
    meta: { title: '前台', icon: 'home' },
    component: () => import('@/layout/job/index.vue'),
    children: [
      {
        path: 'enterprise-home',
        name: 'FrontendEnterpriseHome',
        meta: { title: '企业主页' },
        component: () => import('@/view/job/enterprise/EnterpriseHome.vue')
      },
      {
        path: 'job-list',
        name: 'FrontendJobList',
        meta: { title: '岗位列表' },
        component: () => import('@/view/job/enterprise/JobList.vue')
      },
      {
        path: 'application-records',
        name: 'FrontendApplicationRecords',
        meta: { title: '投递记录', icon: 'info' },
        component: () => import('@/view/job/enterprise/ApplicationRecords.vue')
      },
      {
        path: 'interview-schedule',
        name: 'FrontendInterviewSchedule',
        meta: { title: '面试日程', icon: 'info' },
        component: () => import('@/view/feature/InterviewSchedule.vue')
      }
    ]
  },
  // 企业模块路由 - 后台
  {
    path: '/admin',
    name: 'Admin',
    meta: { title: '后台', icon: 'system' },
    component: () => import('@/layout/job/index.vue'),
    children: [
      {
        path: 'job-management',
        name: 'AdminJobManagement',
        meta: { title: '岗位管理' },
        component: () => import('@/view/job/enterprise/JobManagement.vue')
      },
      {
        path: 'enterprise-info',
        name: 'AdminEnterpriseInfo',
        meta: { title: '企业信息管理' },
        component: () => import('@/view/job/enterprise/EnterpriseInfo.vue')
      },
      {
        path: 'employee-management',
        name: 'AdminEmployeeManagement',
        meta: { title: '员工管理' },
        component: () => import('@/view/job/enterprise/EmployeeManagement.vue')
      },
      {
        path: 'questions',
        name: 'QuestionManage',
        meta: { title: '题库管理' },
        component: () => import('@/view/backend/QuestionManage.vue')
      },
      {
        path: 'experience',
        name: 'ExperienceManage',
        meta: { title: '经验管理' },
        component: () => import('@/view/backend/ExperienceManage.vue')
      },
      {
        path: 'processing',
        name: 'ProcessingManage',
        meta: { title: '处理管理' },
        component: () => import('@/view/backend/ProcessingManage.vue')
      }
    ]
  },
  // 面试功能模块路由
  {
    path: '/interview',
    name: 'Interview',
    component: InterviewLayout,
    children: [
      {
        path: 'questions',
        name: 'QuestionBankUser',
        meta: { title: '面试题库' },
        component: () => import('@/view/feature/QuestionBankUser.vue')
      },
      {
        path: 'experience',
        name: 'InterviewExperience',
        meta: { title: '面试经验' },
        component: () => import('@/view/feature/InterviewExperience.vue')
      },
      {
        path: 'schedule',
        name: 'InterviewSchedule',
        meta: { title: '面试日程' },
        component: () => import('@/view/feature/InterviewSchedule.vue')
      }
    ]
  },
  // 面试经验详情和创建页面（独立页面）
  {
    path: '/interview-experience/create',
    name: 'InterviewExperienceCreate',
    meta: { title: '分享面试经验' },
    component: () => import('@/view/feature/InterviewExperienceCreate.vue'),
    hidden: true
  },
  {
    path: '/interview-experience/:id',
    name: 'InterviewExperienceDetail',
    meta: { title: '面试经验详情' },
    component: () => import('@/view/feature/InterviewExperienceDetail.vue'),
    hidden: true
  },
  // 兼容旧路径：经验详情页
  {
    path: '/feature/interview-experience/:id',
    redirect: to => `/interview-experience/${to.params.id}`,
    hidden: true
  },
  // 兼容旧路径 - 简历模块
  { path: '/editor', redirect: '/resume/editor' },
  { path: '/my-resumes', redirect: '/resume/my-resumes' },
  { path: '/resume-share', redirect: '/resume/share' },
  { path: '/resume-favorites', redirect: '/resume/favorites' },
  { path: '/template/create', redirect: '/resume/template/create' },
  { path: '/dashboard', redirect: '/resume/dashboard' },
  // 兼容旧路径 - 企业模块
  { path: '/enterprise-home', redirect: '/frontend/enterprise-home', hidden: true },
  { path: '/job-list', redirect: '/frontend/job-list', hidden: true },
  { path: '/job-management', redirect: '/admin/job-management', hidden: true },
  { path: '/enterprise-info', redirect: '/admin/enterprise-info', hidden: true },
  { path: '/employee-management', redirect: '/admin/employee-management', hidden: true },
  // 后端管理
  { path: '/backend', name: 'backendIndex', component: BackendIndex },
  // 404 重定向
  {
    path: '/:pathMatch(.*)*',
    redirect: '/',
    hidden: true
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
>>>>>>> resume
})

export default router